home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Keyfile finder. 32 bit pentium optimized code for dos4gw.
- ; You'll need a Microsoft Assembler 6.0 and Watcom Linker to
- ; build the executable. Use the makeex.bat co compile.
- ; Don't forget to set right path in dos4gw.lnk
- ;
- ; this programm takes about 4 hours on p200
-
- .486
- .model flat
-
- _TEXT segment use32 dword public 'CODE'
- assume cs:_TEXT,ds:_DATA
-
-
- start:
- jmp _main
- db 'WATCOM'
-
- _main:
- mov ax,3
- int 10h
-
- push ds
- pop es
-
- mov ax,0
- mov cx,2
- int 31h
- mov ax,2
- mov bx,0B800h
- int 31h
- mov gs,ax
- assume gs:nothing
-
- call InitMagic32
-
- lea edx,msg1
- mov ah,9
- int 21h
-
-
-
- lea edi,Table
- xor ecx,ecx
-
- @st equ 12345678h
- @f10:
- push ecx
- lea esi,Key
- mov eax,ecx
- shl eax,16
- mov ebx,@st
- mov ebp,0
- mov ecx,0FDh-8
- @f11:
- push ecx
- movsx cx,byte ptr [esi]
- mov ax,[esi+1]
- inc esi
- mul cx
- mov cl,[esi+2]
- @@1:
- rol eax,cl
- xor ebx,eax
- xchg eax,ecx
- rol ebx,cl
- add ebp,ecx
- xchg eax,ecx
- not eax
- loop @@1
- pop ecx
- loop @f11
-
- mov ecx,ebp
- and cl,31
- ror ebx,cl
- xor ebx,@st
- mov [edi],cl
- mov [edi+1],ebx
- add edi,5
- pop ecx
- inc cl
- jnz @f10
- inc ch
- mov gs:[0],ch
- jnz @f10
-
- lea edx,msg2
- mov ah,9
- int 21h
-
- mov _eax,eax
-
-
- xor eax,eax
- xor edx,edx
- lea esi,Key
-
- mov cx, 256-8
- @f3: mov al,[esi]
- inc esi
- xor al,dl
- shr edx,8
- xor edx,Magic32[eax*4]
- loop @f3
-
- mov Crc32,edx
-
- mov ecx,0
- @e2:
- push ecx
-
- mov edx,Crc32
- xor eax,eax
- lea esi,Key+256-8
-
- REPT 8
- mov al,cl
- shr ecx,4
- and al,15
- mov bl,dl
- inc eax
- shr edx,8
- mov [esi],al
- xor al,bl
- inc esi
- xor edx,Magic32[eax*4]
- ENDM
-
- mov eax,edx
- mov ebx,edx
-
- shr eax,16
- mov _crc32,edx
-
- mov cl,Table[eax*4+eax]
- xor ebx,dword ptr Table[eax*4+eax+1]
- lea esi, Key+0FDh-8
- rol ebx,cl
-
- mov eax,_eax
-
- xor ecx,ecx
- REPT 8
- local @@1
- mov cl,byte ptr [esi]
- mov ax,[esi+1]
- mul cx
- inc esi
- mov cl,[esi+2]
- @@1:
- rol eax, cl
- xor ebx, eax
- xchg ecx,eax
- rol ebx, cl
- xchg ecx,eax
- not eax
- loop @@1
- ENDM
-
- cmp ebx,0A69EC24Eh
- jz @ok
-
- pop ecx
- inc cx
- jnz @e2
- mov eax,ecx
- shr eax,16
- mov byte ptr gs:[160],ah
- mov byte ptr gs:[162],al
- add ecx,10000h
- jnz @e2
-
- mov ah,4Ch
- int 21h
-
- @ok:
- lea edx,fname
- mov eax,3C00h
- xor ecx,ecx
- int 21h
- xchg eax,ebx
- lea edx,Key
- mov ecx,256
- mov ah,40h
- int 21h
- mov ah,3Eh
- int 21h
- mov ah,4Ch
- int 21h
-
- Magicon equ 0edb88320h
-
- InitMagic32:
- std
- mov edi,OFFSET Magic32+0400h-4 ; Last WORD of the array
- mov edx,0FFh
- im0: mov ecx,8
- mov eax,edx
- im1: shr eax,1
- jnc im2
- xor eax,Magicon
- im2: loop im1
- stosd
- dec edx
- jns im0
- cld
- ret
-
- _TEXT ends
-
- _DATA segment use32 dword public 'DATA'
-
- Key db 13,10,"---=== Keyfile generated by Ak Kort [SOS group] ===---"
- db 13,10," http://www.sos.nanko.ru e-mail: sos@russiamail.com "
- db 13,10,13,10
- db 13,10,13,10
- db 256-($-offset Key) dup(1)
-
- msg1 db ' Precalculating 65536 masks...',13,10,36
- msg2 db ' Cracking...',13,10,36
- fname db '-ok-',0
-
- align 4
- _eax dd ?
- Crc32 dd ?
-
- Magic32 dd 256 dup(?)
- _crc32 dd ?
-
- Table db 5*65536 dup(?)
- _DATA ends
-
- stack segment para stack 'STACK'
- db 2000h dup(?)
- stack ends
-
- end
-
- end start
-
-